$(function(){	
	//页面加上查询条件
	showCondition(true);
	
	paramTabPage[tabId]= $("#tabContent > .tab-pane.active").data();
	$("#" + tabId + " #depCliTarget").html('<i class="fa fa-file-text-o" ></i>'   + "主诊组指标")
	var depGroupName = paramTabPage[tabId].depGroupName;
	$("#"+tabId+" #depGroupName").val(depGroupName);
	var depGroupCode = paramTabPage[tabId].depGroupCode;
	$("#"+tabId+" #depGroupCode").val(depGroupCode);
	var depCode = paramTabPage[tabId].depCode;
	$("#"+tabId+" #depCode").val(depCode);
	var depName = paramTabPage[tabId].depName;
	$("#"+tabId+" #depName").val(depName);
 
	getQuotas("departmentCliMdcMonitor_1", loadData_1, "depCliMdc-ul","mdc");
	
	function loadData_1(totalQuota){
		/*
		 * 全院指标 (1.Hosp 2.All) 参数：1.查询类型2.查询全部
		 * 数据3.查询的指标以及页签名4.此部分所加载的div的id，3.div下面的ul
		 */
		loadDepartmentAllQuota("Hosp", totalQuota, "depCliMdcQuotasId","depCliMdc-ul");
		/*
		 * 加载下面的的div 参数：1.查询指标2.表格头部显示的名字3.布局所在的页面4。div下面的ul
		 */
		loadDepartmentQuota(totalQuota, "MDC", "depCliMdcListQuotasId","depCliMdcList-ul");
		// 为下半部分加载数据
		// 修改loadDepartmentQuotaData参数 By RuanShuLi At2017年3月2日17:20:30
		loadDepartmentQuotaData(totalQuota, "mdc", "toDepLineDrg","loadMdcToDep");
	}
});
//增加  toDepLineDrg方法By RuanShuLi At2017年3月2日17:20:30
function toDepLineDrg(code,desc){
	var param=drgUI.setAjaxData(tabId);
	//科室线下特定MDC下的MDC 
	param.adrgCode = code;
	var depLayer = "";
	switch(param.depLayer){
	case "1":
		depLayer = "depGroup";
		break;
	case "2":
		depLayer = "dep";
		break;
	case "3":
		depLayer = "ward";
		break;
	case "4":
		depLayer = "clinic";
		break;
	}
	openTab('/pages/yizheng/ywcDepLineMdc.jsp',code+"|MDC","ywcDepLine"+depLayer+code+"mdc", "ywcDepLine"+depLayer+code+"mdc",param);
}
//添加loadMdcToDep 向科室的mdc跳转
function loadMdcToDep(code,desc){
	var param=drgUI.setAjaxData(tabId);
	param.mdcCode = code;
	openTab('/pages/department/departmentDisDepMonitor.jsp',code+"|科室",'mdctodep'+code,'mdctodep'+code,param);
}